// 中药房房 接口相关的函数
import request from "@/untils/request.js"

/**
 *
 *  post
 *
 */

// 添加中药房盘点，草稿录入
// export const skPage = (data) => {
//     return request.put("/outpatient/zyfpd", data)
// }

// 添加中药房其他入库
export const tcmDocInsert = (data) => {
    return request.post("/outpatient/tcmDoc/insert", data)
}
// 添加中药房其他出库
export const tcmRetnInsert = (data) => {
    return request.post("/outpatient/tcmRetn/insert", data)
}

// 中药房入库提交审核过单
export const tcmDoctoExamine = (data) => {
    return request.post("/outpatient/tcmDoc/toExamine", data)
}
// 中药房退库提交审核过单
export const tcmRetntoExamine = (data) => {
    return request.post("/outpatient/tcmRetn/toExamine", data)
}

// 修改中药房其他入库
export const editTcm = (data) => {
    return request.post("/outpatient/tcmDoc", data)
}
// 修改中药房其他出库
export const edittcmRetn = (data) => {
    return request.post("/outpatient/tcmRetn", data)
}
/**
 *
 * get
 *
 */

// 点击批次号显示
export const getBatchNumber = (params) => {
    return request.get("/outpatient/dugpurctcmtable/getBatchNumber", {params})
}
// 点击效期调整
export const getExpyDate = (params) => {
    return request.get("/outpatient/dugpurctcmtable/getExpyDate", {params})
}
// 更新有效日期
export const updateDate = (params) => {
    return request.get("/outpatient/dugpurctcmtable/updateDate", {params})
}

// 中药房其他入库列表 = > 分页
export const dugDocPage = (params) => {
    return request.get("/outpatient/tcmDoc/page", {params})
}

// 中药房盘点盘点点击查看或者草稿操作
export const getSkVo = (params) => {
    return request.get("/outpatient/zyfpd/getTcmSkVo", {params})
}

// 中药房流向 = > 分页
export const tcmChgPage = (params) => {
    return request.get("/outpatient/tcmChg/page", {params})
}
// 中药房出库 = > 详情
export const getTcmRetnList = (params) => {
    return request.get("/outpatient/tcmRetn/getTcmRetnList", {params})
}

// 中药房其他出库列表 = > 分页
export const tcmRetnPage = (params) => {
    return request.get("/outpatient/tcmRetn/page", {params})
}

// 中药房其他出库点击加入
export const purcRetnjoin = (params) => {
    return request.get("/outpatient/tcmRetn/join", {params})
}

// 中药列表
export const traMediciList = (params) => {
    return request.get("/outpatient/traMedici/page", {params})
}
// 中药房入库列表
export const tcmDocPage = (params) => {
    return request.get("/outpatient/tcmDoc/page", {params})
}
// 中药房库存列表-分页
export const dugdpurctcmtablePage = (params) => {
    return request.get("/outpatient/dugpurctcmtable/page", {params})
}
// 中药房盘点列表-分页
export const skPage = (params) => {
    return request.get("/outpatient/zyfpd/page", {params})
}
/**
 *
 * DELETE
 *
 */
// 中药房其他入库草稿删除
export const deleteTcm = (params) => {
    return request.delete("/outpatient/tcmDoc/deleteDoc", {params})
}

// 新增中药房盘点
export const skInsert = (data) => {
    return request.post("/outpatient/zyfpd/insert", data)
}

/*
	Others
*/
// 入库方式
export const tcmDocSelectPutin = (params) => {
    return request.get("/outpatient/tcmDoc/selectPutin", {params})
}
// 中成药目录列表
export const traMediciPage = (params) => {
    return request.get("/outpatient/traMedici/page", {params})
}
// 中药房出库，选择要出库的药品
export const tcmRetnselectTcmList = (params) => {
    return request.get("/outpatient/tcmRetn/selectTcmList", {params})
}
// 中药房入库，详情页
export const tcmDocDrugDetails = (params) => {
    return request.get("/outpatient/tcmDoc/getDrugDetails", {params})
}
// 供应商下拉列表
export const selectDropDownList = (params) => {
    return request.get("/outpatient/selectDropDownList", {params})
}
// 获取药品加成率 => 西药
export const getDocMark = (params) => {
    return request.get("/outpatient/docMark/page", {params})
}
// 暴露
export default {
    // 中药目录药品档案列表
    traMediciList, tcmDocPage,
    // 中药房采购计划

    // 中药房采购入库
    dugDocPage, tcmDocInsert, tcmDocSelectPutin, traMediciPage, tcmRetnPage, tcmDoctoExamine, deleteTcm, editTcm,
    // 中药房盘点
    skPage, getSkVo, skInsert,
    // 中药房库存 ： 入库 =>
    dugdpurctcmtablePage, tcmDocDrugDetails,
    // 中药房库存 ： 出库 =>
    tcmRetnselectTcmList, tcmRetnInsert, getTcmRetnList, tcmRetntoExamine, edittcmRetn, purcRetnjoin,
    // 中药房库存 ： 流向 =>
    tcmChgPage,
    // 入库方式
    // 效期
    getBatchNumber, getExpyDate, updateDate,
    // Others
    selectDropDownList, getDocMark
}